1. Field of the Invention
The present invention relates to a data recording and reproducing apparatus having a plurality of operating modes for recording and reproducing data.
2. Description of the Prior Art
Since an optical disk has many defective sectors in comparison with a magnetic disk or the like, efficient management of these defective sectors is necessary for an optical disk apparatus. For example, Draft Proposal 10089 presented by ISO/SC23 describes a defect management technique applied to a 130 mm rewritable optical disk. FIG. 8 is a structural view of areas of the optical disk described in this Draft Proposal. Referring to FIG. 8, a User Zone on the disk is divided into a Definition Zone and a User Area which is further divided into n groups, each group consisting of a Data Area where user data is recorded and a Spare Area where spare sectors are allocated. There are defined three areas in the Definition Zone, namely, a DDS Area where a DDS (Disk Definition Structure) holding all the management or control data of the areas within the User Zone is recorded, a PDL Area where a Primary Defect List stores all of the physical addresses of defective sectors detected through the formatting process, and an SDL Area where a Secondary Defect List stores all of all the physical addresses of the defective sectors detected during recording and the physical addresses of spare sectors by which the defective sectors were replaced. Although these Areas are illustrated as if at one place on the disk in FIG. 8 for brevity, the areas are formed at two places allocated at the inner and outer peripheral portions of the disk to secure high reliability according to the Draft Proposal.
FIGS. 9(a) and 9(b) shows a data structure of the Defect List described in the Draft Proposal; FIG. 9(a) shows the data of the Primary Defect List and FIG. 9(b) shows the data of the Secondary Defect List. A Defect List Identifier for identifying the kind of the defect list and a List Length are recorded at the head of each Defect List, and subsequently Defect Entries corresponding to the respective defective sectors are recorded. (0001)h is recorded at the Defect List Identifier of the Primary Defect List records (0001)h, while (0002)h is recorded at the Defect List Identifier of the Secondary Defect List records. The Defect Entry recorded in the Primary Defect List includes a physical address of a defective sector represented in 4-byte length. On the other hand, a Defect Entry recorded in the Secondary Defect List records physical addresses of both the defective sector and the replaced spare sector represented by a word having a 4-byte length.
The process for Defect Management will be explained below. In the first place, as an option in the formatting process, certification for all the sectors in the user zone is carried out by performing a recording operation and a verifying operation using test data. If defective sectors are detected during this certification, the detected defective sectors are stored in the Primary Defect List. However, new defective sectors are normally found after the formatting process as a result of the degradation of the recording material or a scratch on the disk. To secure sufficient reliability of the recording data, therefore, it becomes necessary to start a verifying operation immediately after the data is recorded. In the case of recording user data, if a defective sector is found in the recording operation and the succeeding verifying operation, the recording data is recorded in a spare sector and moreover, a defect entry comprised of a pair of addresses of the defective sector and its corresponding spare sector is stored in the Secondary Defect List. In the case of recording and reproducing the user data, a logical address of a target sector designated by a host computer is converted to a physical address on the disk with reference to the defect lists. FIGS. 10(a)-10(c) show the relation between the logical address and the physical address. The following description is based on the assumption that two defective sectors (one has a track address=0 and a sector address=1, the other has a track address=0, a sector address=5) are stored in the Primary Defect List, and a spare sector (track address=90, sector address=0) is assigned to one defective sector (track address=0, sector address=2) in the Secondary Defect List. In the first step of the address conversion, the logical address of a target sector shown in FIG. 10(a) is changed to an intermediate address shown in FIG. 10(b) using the Primary Defect List. At this time, the intermediate address is assigned to each sector while sequentially skipping the defective sectors stored in the Primary Defect List from one end of the data area. Then, in the second step, the intermediate addresses stored defective sector addresses are searched from the Secondary Defect List. The physical sector address of the sector (track address=0, sector address=2) stored in the Secondary Defect List is set as an address of the replacement sector recorded in the defect entry. Meanwhile, the physical sector address of a sector not stored in the Secondary Defect List is given as an intermediate address itself. After the physical address of the target sector is obtained in the manner as above, data is recorded on and reproduced from the optical disk.
According to the conventional defect management as described above, all of the defective sectors detected after the formatting process are replaced according to a linear replacement algorithm. Random access data controlled by, e.g., UNIX or MS-DOS are dispersedly recorded on the disk, so that no problem occurs in accessing the data even when the defective sectors in the user zone are replaced with spare sectors in the spare area according to this algorithm. However, if the spare sector is accessed during the reproduction of real time data such as images or sounds that needs continuity, a seek operation occurs between the user zone and spare area, resulting in a time gap in the reproduction of data.